<?php
namespace Admin\Controller;
use Think\Controller;
class UserController extends CommonController {

     //初始化操作
    public function _initialize(){
         parent::_initialize();
    }
    
    public function index(){
    	$model= M('admin_user');
    	$list = $model->select();
    	$this->assign('line','用户管理');
    	$this->assign('line_name','用户列表');
    	$this->assign('list',$list);
    	$this->display();  	
    }

    public function del(){
    	$id = I('get.id');

    	$model = M('admin_user');

    	if($model->delete($id)){
    		$this->ajaxReturn('成功');	
    	}else{
    		$this->ajaxReturn('失败');
    	}
    }


    public function add(){
        echo 'add';
    }


    public function save(){
        echo 'save';
    }
}